<template>
  <div>
    <h2 >学生姓名:{{ name }}</h2>
    <h2>年龄:{{ age }}</h2>
    <button @click="sendName">发送数据</button>
  </div>
</template>

<script>

export default {
  name: 'Student_C',
  data() {
    return {
      name: '学生组件',
      age: 18
    }
  },
  methods: {
    sendName() {
      // 组件自定义事件
      this.$bus.$emit('getStudentName',this.name,666,888)
    },
  }



}
</script>
<style scoped>


</style>